package com.itcoon.transform.base.definition;

import java.util.ArrayList;
import java.util.List;

/**
 * transform 目标实体信息描述
 */
public class ModelDefinition {

    /**
     * 唯一标志ID
     */
    private int id;

    /**
     * 目标dto对象
     */
    private Class<?> targetClass;

    /**
     * 转换源对象的类对象
     */
    private Class<?> originClass;

    /**
     * 字段信息
     */
    private List<ModelPropertyDefinition> propertyDefinitions = new ArrayList<>();

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Class<?> getTargetClass() {
        return targetClass;
    }

    public void setTargetClass(Class<?> targetClass) {
        this.targetClass = targetClass;
    }

    public Class<?> getOriginClass() {
        return originClass;
    }

    public void setOriginClass(Class<?> originClass) {
        this.originClass = originClass;
    }

    public List<ModelPropertyDefinition> getPropertyDefinitions() {
        return propertyDefinitions;
    }

    public void setPropertyDefinitions(List<ModelPropertyDefinition> propertyDefinitions) {
        this.propertyDefinitions = propertyDefinitions;
    }

    @Override
    public String toString() {
        return "ModelDefinition{" +
                "id=" + id +
                ", targetClass=" + targetClass +
                ", originClass=" + originClass +
                ", propertyDefinitions=" + propertyDefinitions +
                '}';
    }
}
